const { rejects } = require('assert')
const fs = require('fs');
const { userInfo } = require('os');
const { resolve } = require('path')
let uid =1;
function readFile(path, prevData) {
  return new Promise((resolve, reject) => {
    fs.readFile(path, 'utf8', function (err, data) {
      if (err) {
        reject(err)
      }
      const resData = JSON.parse(data)
      resolve({
        prevData,
        resData
      })
    })
  
  readFile('./user.json')
    .then(res=>{})